﻿using HYHY_Core.Entities.Utils;
using HYQY_Core.Entities.Utils;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HYQY_App.Admin_System.Dtos
{
    /// <summary>
    /// 商品管理Dto
    /// </summary>
    public class CommodityAdminDto
    {
        /// <summary>
        /// 商品列表-下拉框-获取点单类目-输出
        /// </summary>
        public class SelectCategoryList_BelowOutPut
        {
            /// <summary>
            /// 类目id
            /// </summary>
            public int Id { get; set; }

            /// <summary>
            /// 类目名称
            /// </summary>
            public required string Name { get; set; }

            /// <summary>
            /// 排序
            /// </summary>
            public int Sort { get; set; }
        }

        /// <summary>
        /// 商品列表-输入
        /// </summary>
        public class SelectCommodityListInput : InputPageBase
        {
            /// <summary>
            /// 搜索关键字
            /// </summary>
            public string KeyWord { get; set; }

            /// <summary>
            /// 是否设置到分类
            /// </summary>
            public bool? IsSetClassify { get; set; }

            /// <summary>
            /// 是否设置到猜你喜欢
            /// </summary>
            public bool? IsGuessWhatYouLikeValue { get; set; }

            /// <summary>
            /// 类目id
            /// </summary>
            public int? CategoryId { get; set; }

            /// <summary>
            /// 开始时间
            /// </summary>
            public DateTime? StartDate { get; set; }

            /// <summary>
            /// 结束时间
            /// </summary>
            public DateTime? EndDate { get; set; }
        }

        /// <summary>
        /// 商品列表-输出
        /// </summary>
        public class SelectCommodityListOutPut
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }

            /// <summary>
            /// 商品名称
            /// </summary>
            public required string WareName { get; set; }

            /// <summary>
            /// 商品详情
            /// </summary>
            public required string WareDetail { get; set; }

            /// <summary>
            /// 商品价格
            /// </summary>
            public decimal Price { get; set; }

            /// <summary>
            /// 库存
            /// </summary>
            public long Stock { get; set; }

            /// <summary>
            /// 类目id
            /// </summary>
            public int CategoryId { get; set; }

            /// <summary>
            /// 图片路径
            /// </summary>
            public string Path { get; set; }

            /// <summary>
            /// 类型
            /// </summary>
            public string CategoryName { get; set; }

            /// <summary>
            /// 是否设置到分类
            /// </summary>
            public bool IsClassify { get; set; }

            /// <summary>
            /// 是否设置到猜你喜欢
            /// </summary>
            public bool IsGuessWhatYouLike { get; set; }

            /// <summary>
            /// 商品状态：<br/>
            /// 售卖中：1<br/>
            /// 已下架：0
            /// </summary>
            public int WareState { get; set; }

            /// <summary>
            /// 下架时间
            /// </summary>
            public DateTime? UndercarriageTime { get; set; }

            /// <summary>
            /// 创建时间
            /// </summary>
            public DateTime? CreateTime { get; set; }

            /// <summary>
            /// 创建人
            /// </summary>
            public string CreateMan { get; set; }

            /// <summary>
            /// 修改时间
            /// </summary>
            public DateTime? UpdateTime { get; set; }

            /// <summary>
            /// 修改人
            /// </summary>
            public string UpdateMan { get; set; }
        }

        /// <summary>
        /// 商品列表-响应
        /// </summary>
        public class SelectCommodityListResp : ResponseStatus
        {
            /// <summary>
            /// 数据列表
            /// </summary>
            public required List<SelectCommodityListOutPut> List { get; set; }

            /// <summary>
            /// 条数
            /// </summary>
            public int Total { get; set; }
        }

        /// <summary>
        /// 商品列表-是否设置到分类或者猜你喜欢-输入
        /// </summary>
        public class IsSetOrderMealOrGuessWhatYouLikeInput
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }

            /// <summary>
            /// 是否设置到分类
            /// </summary>
            public bool IsClassify { get; set; }

            /// <summary>
            /// 是否设置到猜你喜欢
            /// </summary>
            public bool IsGuessWhatYouLike { get; set; }
        }

        /// <summary>
        /// 商品列表-设置商品状态-输入
        /// </summary>
        public class SetWareStateInput
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }

            /// <summary>
            /// 商品状态：<br/>
            /// 售卖中：1<br/>
            /// 已下架：0
            /// </summary>
            public int WareState { get; set; }
        }

        // <summary>
        /// 类目设置-获取类目列表-输入
        /// </summary>
        public class SelectCategoryListInput : InputPageBase
        {
            /// <summary>
            /// 搜索关键字
            /// </summary>
            public string KeyWord { get; set; }
        }

        /// <summary>
        /// 类目设置-获取类目列表-输出
        /// </summary>
        public class SelectCategoryListOutPut
        {
            /// <summary>
            /// 类目id
            /// </summary>
            public int Id { get; set; }

            /// <summary>
            /// 类目名称
            /// </summary>
            public required string Name { get; set; }

            /// <summary>
            /// 排序
            /// </summary>
            public int Sort { get; set; }
        }

        /// <summary>
        /// 类目设置-获取类目列表-响应
        /// </summary>
        public class SelectCategoryListResp : ResponseStatus
        {
            public List<SelectCategoryListOutPut> List { get; set; }

            public int Total { get; set; }
        }

        /// <summary>
        /// 类目设置-更新排序-输入
        /// </summary>
        public class UpdateSortInput
        {
            /// <summary>
            /// 类目id
            /// </summary>
            public int? Id { get; set; }

            /// <summary>
            /// 排序
            /// </summary>
            public int? Sort { get; set; }
        }

        /// <summary>
        /// 新增类目-输入
        /// </summary>
        public class AddCategorieInput
        {
            /// <summary>
            /// 类目名称
            /// </summary>
            public required string Name { get; set; }

            /// <summary>
            /// 排序
            /// </summary>
            public int? Sort { get; set; }
        }

        /// <summary>
        /// 删除类目-输入
        /// </summary>
        public class DeleteCategoryInput
        {
            /// <summary>
            /// 类目id
            /// </summary>
            public List<int> Ids { get; set; }
        }

        /// <summary>
        /// 商品管理-编辑-获取商品详情-输入
        /// </summary>
        public class SelectWareInfoInput
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }
        }

        /// <summary>
        /// 商品管理-编辑-获取商品详情-输出
        /// </summary>
        public class SelectWareInfoOutput : ResponseStatus
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }

            /// <summary>
            /// 商品名称
            /// </summary>
            public string WareName { get; set; }

            /// <summary>
            /// 商品详情
            /// </summary>
            public string WareDetail { get; set; }

            /// <summary>
            /// 商品价格
            /// </summary>
            public decimal Price { get; set; }

            /// <summary>
            /// 类目id
            /// </summary>
            public int CategoryId { get; set; }

            /// <summary>
            /// 是否设置到分类
            /// </summary>
            public bool IsClassify { get; set; }

            /// <summary>
            /// 是否设置到猜你喜欢
            /// </summary>
            public bool IsGuessWhatYouLike { get; set; }

            /// <summary>
            /// 主图
            /// </summary>
            public List<string> MainImages { get; set; }

            /// <summary>
            /// 详情图
            /// </summary>
            public List<string> DetailImages { get; set; }
        }

        /// <summary>
        /// 商品管理-商品编辑-输入
        /// </summary>
        public class UpdateCommodityInput
        {
            /// <summary>
            /// 商品编码
            /// </summary>
            public string WareCode { get; set; }

            /// <summary>
            /// 商品名称
            /// </summary>
            public string WareName { get; set; }

            /// <summary>
            /// 商品详情
            /// </summary>
            public string WareDetail { get; set; }

            /// <summary>
            /// 商品价格
            /// </summary>
            public decimal Price { get; set; }

            /// <summary>
            /// 类目id
            /// </summary>
            public int CategoryId { get; set; }

            /// <summary>
            /// 是否设置到分类
            /// </summary>
            public bool IsClassify { get; set; }

            /// <summary>
            /// 是否设置到猜你喜欢
            /// </summary>
            public bool IsGuessWhatYouLike { get; set; }

            /// <summary>
            /// 详情图片路径
            /// </summary>
            public List<string> DetailImages { get; set; }

            /// <summary>
            /// 主图片路径
            /// </summary>
            public List<string> MainImages { get; set; }
        }

        /// <summary>
        /// 发布商品-输入
        /// </summary>
        public class CommodityReleaseInput
        {
            /// <summary>
            /// 商品名称
            /// </summary>
            public string WareName { get; set; }

            /// <summary>
            /// 商品详情
            /// </summary>
            public string WareDetail { get; set; }

            /// <summary>
            /// 商品价格
            /// </summary>
            public decimal Price { get; set; }

            /// <summary>
            /// 类目id
            /// </summary>
            public int? CategoryId { get; set; }

            /// <summary>
            /// 详情图片路径
            /// </summary>
            public List<string> DetailImages { get; set; }

            /// <summary>
            /// 主图片路径
            /// </summary>
            public List<string> MainImages { get; set; }

            /// <summary>
            /// 库存
            /// </summary>
            public long Stock { get; set; }

            /// <summary>
            /// 商品状态：<br/>
            /// 售卖中：1<br/>
            /// 已下架：0
            /// </summary>
            public int WareState { get; set; }
        }
    }
}
